<table><tr><td width="100%">{{ titulo }}</td></tr></table>
<table id="eventos">
    <thead>
        <tr>
            <th class="codigo">C&oacute;digo</th>
            {% for obj in dias %}
            <th id="{{ obj.dia }}">{{ obj.num }}</th>
            {% endfor %}
            <th>Total</th>
        </tr>
    </thead>
    <tbody>
       {% for tarea in tareas %}
       <tr>
           <td width="200px">{{ tarea.codigo }}</td>
           {% for dia in dias %}
              <td width="35px">{% if dia.weekend == 'N' %}{% for evento in hoja %}{% if evento.dia == dia.dia and evento.codigo == tarea.codigo %}{% if evento.hora %}{{ evento.hora }}{% else %}0{% endif %}{% endif %}{% endfor %}{% else %}X{% endif %}</td>
           {% endfor %}
           <td width="65px">{% for obj in totalEventos %}{% if obj.codigo == tarea.codigo %}{{ obj.hora }}{% endif %}{% endfor %}</td>
       </tr>
       {% endfor %}
       <tr>
           <td>Total</td>
            {% for dia in dias %}
                <td>{% if dia.weekend == 'N' %}{% for obj in totalDias %}{% if dia.dia == obj.dia %}{{ obj.hora }}{% endif %}{% endfor %}{% else %}X{% endif %}</td>
            {% endfor %}
           <td>&nbsp;</td>
       </tr>
    </tbody>
</table>